Cmd
IntroductionThe base class for all command classes (Esc, TSC, cpcl, and pin) Methods
Append:-(void)Append:(NSData *)data; ParametersDiscussion* Add instructions to the cache for use in the last call to GetCmd Append:len:Add instructions to the cache for use in the last call to GetCmd -(void)Append:(Byte*)bytes len:(NSInteger)len; ParametersDiscussion* Clear-(void)Clear; DiscussionClear the cache data GetBarCodeCmd:codeType:scode:codeError:-(NSData *_Nullable) GetBarCodeCmd:(BarcodeSetting *_Nonnull)barcodeset codeType:(BarcodeType)codeType scode:(nonnull NSString * )scode codeError:(PrinterCodeError *_Nonnull)codeError; ParametersReturn ValueNSData DiscussionGet barcode instructions GetBeepCmd:interval:- (NSData *) GetBeepCmd:(Byte)level interval:(Byte)interval; ParametersDiscussionBeep sound GetBitMapCmd:image:-(NSData *) GetBitMapCmd:(BitmapSetting *) bitmapSetting image:(UIImage *) image; ParametersReturn ValueNSData DiscussionGet the picture print order GetBitMapCmdExt:image:-(NSData *) GetBitMapCmdExt:(BitmapSetting *) bitmapSetting image:(UIImage *) image; ParametersReturn ValueNSData DiscussionGet the picture print order(Used for the Esc command, when printing long images, and connected with wifi, usb) GetBlackLabelPlusCmd:- (NSData *)GetBlackLabelPlusCmd:(int)plus; Discussionset the black label step more plus millimeter GetBlackLabelSubCmd:- (NSData *)GetBlackLabelSubCmd:(int)sub; Discussionset the black label step less sub millimeter GetCmd-(NSData *_Nullable) GetCmd; Return ValueNSData Discussion*Get all the instructions generated by calling the Append method GetCodePageCmd:-(NSData *)GetCodePageCmd:(NSString *)codepage; Discussioncodepage set the codepage for ESC GetCompressedBitMapCmd:image:-(NSData *) GetCompressedBitMapCmd:(BitmapSetting *) bitmapSetting image:(UIImage *) image; ParametersReturn ValueNSData DiscussionGet the compressed picture print order (for esc command, only few printer support), if you want to use it please contact technical support first GetCRCmd-(NSData *) GetCRCmd; Return ValueNSData DiscussionGet print carriage return instruction GetCutPaperCmd:- (NSData *) GetCutPaperCmd:(CutterMode) cutterMode; ParametersDiscussionPaper cutting control command GetFeedAndCutPaperCmd:FeedDistance:- (NSData *) GetFeedAndCutPaperCmd:(BOOL)isFeed FeedDistance:(Byte)FeedDistance; ParametersDiscussionSelect the cut mode and cut the paper GetHeaderCmd-(NSData *) GetHeaderCmd; DiscussionGet initialization command header GetHeaderCmd:-(NSData *) GetHeaderCmd:(CommonSetting *_Nonnull)ComSetting; DiscussionGet initialization command header, and set parameters according to ComSetting GetLFCmd-(NSData *) GetLFCmd; Return ValueNSData DiscussionGet line feed instruction GetLFCRCmd-(NSData *_Nonnull) GetLFCRCmd; Return ValueNSData DiscussionGet the carriage return line feed instruction GetNullData-(NSData *_Nullable) GetNullData; Return ValueNSData DiscussionGet empty NSData GetOpenDrawerCmd:startTime:endTime:- (NSData *) GetOpenDrawerCmd:(Byte)DrawerNumber startTime:(Byte)pulseStartTime endTime:(Byte)PulseEndTime; ParametersDiscussionOpen the cashbox GetPrintEndCmd-(NSData *_Nullable) GetPrintEndCmd; Return ValueNSData DiscussionGet the end of the print order (Pincmd is used for rewinding, TSC, CPCL is to send print commands, ESC: carriage return line feed command) GetPrintEndCmd:-(NSData *_Nullable) GetPrintEndCmd:(NSInteger)copies; ParametersReturn ValueNSData DiscussionGet the end of the print order (Pincmd is used for rewinding, TSC, CPCL is to send print commands, ESC: carriage return line feed command) GetSelftestCmd-(NSData *) GetSelftestCmd; Return ValueNSData DiscussionGet instructions to print a self-test page GetSetPointCmdByX:andY:- (NSData *)GetSetPointCmdByX:(int)x andY:(int)y; Discussionset the start X and Y axis GetTextCmd:text:-(NSData *) GetTextCmd:(TextSetting *)textSetting text:(NSString *)text; ParametersReturn ValueReturn command data DiscussionBy textSetting get the corresponding text instruction ImportData:-(NSData *) ImportData:(nonnull NSString*) data; ParametersReturn ValueReturns data of the specified encodingType encoding DiscussionGenerate data of the specified encodingType encoding MoveData:dest:index:-(void)MoveData:(NSData *)source dest:(Byte *)dest index:(NSInteger *)index; ParametersDiscussionThe value of the source assigned to dest, dest from the index assignment, each assigned a byte index will increase by one MoveData:ibegin:len:dest:dindex:-(void)MoveData:(Byte *)source ibegin:(NSInteger)ibegin len:(NSInteger) len dest:(Byte *)dest dindex:(NSInteger *)dindex; ParametersDiscussionThe source value (starting from ibegin to length len) assigned to dest, dest from the index assignment, each assigned a byte index will increase by 1 PropertiesbarcodeBufferSize@property (nonatomic) NSInteger barcodeBufferSize; DiscussionAfter the end of the bar code, to print a few end characters 0x00, the default is 1 encodingType@property (nonatomic) EncodingType encodingType; DiscussionEncoding Type |